package com.lwk.springboot.service;

import com.lwk.springboot.dao.UserDao;
import com.lwk.springboot.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: leiwenkang02@meituan.com
 * @date: 2018/4/12
 * @time: 20:38
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User getUserById(Integer id) {
        return userDao.getUserById(id);
    }
    @Override
    public List<User> getUserList() {
        return userDao.getUserList();
    }
    @Override
    public int insert(User user) {
        return userDao.insert(user);
    }
    @Override
    public int update(Integer id, User user) {
        return userDao.update(id, user);
    }
    @Override
    public int delete(Integer id) {
        return userDao.delete(id);
    }
}
